﻿package org.nickro.externallibrary
{
 import flash.display.*;
 import flash.events.Event;
 import flash.events.ContextMenuEvent;
 import flash.net.*;
 import flash.ui.*;
 public class RightClass
 {
  public function RightClass(obj:Object):void
  {
   obj.stage.scaleMode=StageScaleMode.NO_SCALE;
   obj.stage.align=StageAlign.TOP_LEFT;
   var menuItem1:ContextMenuItem = new ContextMenuItem("bologoo.com");
   var menuItem2:ContextMenuItem = new ContextMenuItem("Contact us!");
   menuItem1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,toUrl);
   menuItem2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,toMsg);
   var myMenu:ContextMenu = new ContextMenu();
   myMenu.hideBuiltInItems();
   myMenu.customItems.push(menuItem1);
   myMenu.customItems.push(menuItem2);
   obj.contextMenu = myMenu;
   function toUrl(e:ContextMenuEvent)
   {
    var tagetURL:URLRequest = new URLRequest("http://www.bologoo.com");
    navigateToURL(tagetURL);
   }
   function toMsg(e:ContextMenuEvent)
   {
    var tagetURL:URLRequest = new URLRequest("tencent://message/?uin=519976005&Site=magic0&Menu=yes/");//启动QQ
    navigateToURL(tagetURL);
   }
  }
 }
}

